<template>
    <div>
       <ul class="mui-table-view">
				<li class="mui-table-view-cell mui-media" v-for="item in newslist" :key="item.id">
					<a href="javascript:;">
						<img class="mui-media-object mui-pull-left" src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3329523335,731969596&fm=27&gp=0.jpg">
							<h1>{{item.title}}
							<p class='mui-ellipsis'>
                                
                                <span>发表时间:{{item.add_time}}</span>
                                <span>点击:{{item.click}}</span>
                            </p>
						</h1>
					</a>
				</li>
                
				
				

			</ul>
    </div>
</template>

<script>
    export default{
        data(){
            return{
                newslist:''
            }
        },
        created(){
            this.getnewslist(); 
        },
        methods:{
            getnewslist(){
                this.$http.get('api/getnewslist').then(result=>{
                    if(result.status===0||result.status===200){
                        console.log(result)
                        this.newslist=result.body.message
                    }else{
                        Tosat('获取新闻失败')
                    }
                })
            }
        }
    }
</script>

<style scoped>
    li{
        margin-top: 15px;
    }
    h1{
        font-size: 14px;
    }
    p{
        font-size: 12px;
        color: #226af2;
        display: flex;
        justify-content: space-between; 
        padding-top: 5px;
    }
</style>
